<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//登录路由组
Route::group(['middleware'=>'login'],function(){
	//后台主页
	Route::get('/admin','AdminController@index');
	
});

Route::get('/pic','AdminController@pic');
//上传文件
Route::get('/upload','AdminController@upload');
//删除文件
Route::get('/del/{id}','AdminController@del');
//执行上传
Route::post('/doUpload','AdminController@uploadFile');



Route::resource('user','UserController');
Route::resource('Article','ArticleController');
Route::get('login','LoginController@index');
Route::post('login','LoginController@doLogin');
Route::get('outLogin','LoginController@outLogin');

Route::get('/shop/carts','CartController@index');
Route::get('/shop/addcart/{id}','CartController@addcart');
Route::get('/shop/cart','CartController@cart');
Route::get('/shop/del','CartController@del');
Route::get('/shop/removecart/{rowId}','CartController@removecart');








